Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix faulty span.frame_delay calculation for early app start spans #3427

Merged
merged 3 commits into from
May 16, 2024

Conversation

markushi
Copy link
Member

📜 Description

The return value of frameMetricsCollector.getLastKnownFrameStartTimeNanos() was ignored, thus creating large frame delay values.

I also moved data collection post initial tracer.finish, ensuring a finish timestamp is set and spans / txns are already trimmed. This is especially useful for idle ui.load transactions, as otherwise the frame delay will be longer than the txn duration.

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented May 16, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 378.62 ms 453.98 ms 75.36 ms
Size 1.70 MiB 2.28 MiB 592.12 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
7ca9895 364.31 ms 460.46 ms 96.15 ms
bf82eb3 423.76 ms 506.45 ms 82.69 ms
d429384 397.33 ms 457.69 ms 60.36 ms
f5e1b97 362.53 ms 429.31 ms 66.78 ms
c554ca2 368.52 ms 430.74 ms 62.22 ms
9119d59 407.12 ms 509.64 ms 102.52 ms
a33b076 381.94 ms 459.64 ms 77.71 ms
93a76ca 397.30 ms 455.16 ms 57.87 ms
283d83e 348.44 ms 392.06 ms 43.62 ms
9e57f46 368.94 ms 410.50 ms 41.56 ms

App size

Revision Plain With Sentry Diff
7ca9895 1.72 MiB 2.29 MiB 576.51 KiB
bf82eb3 1.70 MiB 2.28 MiB 587.99 KiB
d429384 1.72 MiB 2.27 MiB 558.42 KiB
f5e1b97 1.70 MiB 2.28 MiB 592.00 KiB
c554ca2 1.70 MiB 2.27 MiB 582.25 KiB
9119d59 1.70 MiB 2.27 MiB 583.84 KiB
a33b076 1.70 MiB 2.28 MiB 592.32 KiB
93a76ca 1.72 MiB 2.29 MiB 576.75 KiB
283d83e 1.72 MiB 2.29 MiB 577.69 KiB
9e57f46 1.70 MiB 2.28 MiB 592.08 KiB

Previous results on branch: fix/huge-frame-delay

Startup times

Revision Plain With Sentry Diff
ab36940 378.21 ms 454.76 ms 76.55 ms

App size

Revision Plain With Sentry Diff
ab36940 1.70 MiB 2.28 MiB 592.12 KiB

Copy link
Member

@stefanosiano stefanosiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@markushi markushi changed the title Fix large frame delay values Fix faulty span.frame_delay calculation for early app start spans May 16, 2024
@markushi markushi merged commit 619c9b9 into main May 16, 2024
25 checks passed
@markushi markushi deleted the fix/huge-frame-delay branch May 16, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants